3.1.5 \(\int \text {csch}(c+d x) (a+b \text {sech}^2(c+d x)) \, dx\) [5]

Optimal. Leaf size=27 \[ -\frac {(a+b) \tanh ^{-1}(\cosh (c+d x))}{d}+\frac {b \text {sech}(c+d x)}{d} \]

[Out]

-(a+b)*arctanh(cosh(d*x+c))/d+b*sech(d*x+c)/d

________________________________________________________________________________________

Rubi [A]
time = 0.03, antiderivative size = 27, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.158, Rules used = {4218, 464, 212} \begin {gather*} \frac {b \text {sech}(c+d x)}{d}-\frac {(a+b) \tanh ^{-1}(\cosh (c+d x))}{d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Csch[c + d*x]*(a + b*Sech[c + d*x]^2),x]

[Out]

-(((a + b)*ArcTanh[Cosh[c + d*x]])/d) + (b*Sech[c + d*x])/d

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 464

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[c*(e*x)^(m +
 1)*((a + b*x^n)^(p + 1)/(a*e*(m + 1))), x] + Dist[(a*d*(m + 1) - b*c*(m + n*(p + 1) + 1))/(a*e^n*(m + 1)), In
t[(e*x)^(m + n)*(a + b*x^n)^p, x], x] /; FreeQ[{a, b, c, d, e, p}, x] && NeQ[b*c - a*d, 0] && (IntegerQ[n] ||
GtQ[e, 0]) && ((GtQ[n, 0] && LtQ[m, -1]) || (LtQ[n, 0] && GtQ[m + n, -1])) &&  !ILtQ[p, -1]

Rule 4218

Int[((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_.)*sin[(e_.) + (f_.)*(x_)]^(m_.), x_Symbol] :> With[{ff = F
reeFactors[Cos[e + f*x], x]}, Dist[-ff/f, Subst[Int[(1 - ff^2*x^2)^((m - 1)/2)*((b + a*(ff*x)^n)^p/(ff*x)^(n*p
)), x], x, Cos[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x] && IntegerQ[(m - 1)/2] && IntegerQ[n] && IntegerQ[p
]

Rubi steps

\begin {align*} \int \text {csch}(c+d x) \left (a+b \text {sech}^2(c+d x)\right ) \, dx &=-\frac {\text {Subst}\left (\int \frac {b+a x^2}{x^2 \left (1-x^2\right )} \, dx,x,\cosh (c+d x)\right )}{d}\\ &=\frac {b \text {sech}(c+d x)}{d}-\frac {(a+b) \text {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\cosh (c+d x)\right )}{d}\\ &=-\frac {(a+b) \tanh ^{-1}(\cosh (c+d x))}{d}+\frac {b \text {sech}(c+d x)}{d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(67\) vs. \(2(27)=54\).
time = 0.04, size = 67, normalized size = 2.48 \begin {gather*} -\frac {a \log \left (\cosh \left (\frac {c}{2}+\frac {d x}{2}\right )\right )}{d}+\frac {a \log \left (\sinh \left (\frac {c}{2}+\frac {d x}{2}\right )\right )}{d}+\frac {b \log \left (\tanh \left (\frac {1}{2} (c+d x)\right )\right )}{d}+\frac {b \text {sech}(c+d x)}{d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Csch[c + d*x]*(a + b*Sech[c + d*x]^2),x]

[Out]

-((a*Log[Cosh[c/2 + (d*x)/2]])/d) + (a*Log[Sinh[c/2 + (d*x)/2]])/d + (b*Log[Tanh[(c + d*x)/2]])/d + (b*Sech[c
+ d*x])/d

________________________________________________________________________________________

Maple [A]
time = 1.10, size = 36, normalized size = 1.33

method result size
derivativedivides \(\frac {-2 a \arctanh \left ({\mathrm e}^{d x +c}\right )+b \left (\frac {1}{\cosh \left (d x +c \right )}-2 \arctanh \left ({\mathrm e}^{d x +c}\right )\right )}{d}\) \(36\)
default \(\frac {-2 a \arctanh \left ({\mathrm e}^{d x +c}\right )+b \left (\frac {1}{\cosh \left (d x +c \right )}-2 \arctanh \left ({\mathrm e}^{d x +c}\right )\right )}{d}\) \(36\)
risch \(\frac {2 b \,{\mathrm e}^{d x +c}}{d \left (1+{\mathrm e}^{2 d x +2 c}\right )}-\frac {a \ln \left ({\mathrm e}^{d x +c}+1\right )}{d}-\frac {\ln \left ({\mathrm e}^{d x +c}+1\right ) b}{d}+\frac {a \ln \left ({\mathrm e}^{d x +c}-1\right )}{d}+\frac {\ln \left ({\mathrm e}^{d x +c}-1\right ) b}{d}\) \(85\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csch(d*x+c)*(a+b*sech(d*x+c)^2),x,method=_RETURNVERBOSE)

[Out]

1/d*(-2*a*arctanh(exp(d*x+c))+b*(1/cosh(d*x+c)-2*arctanh(exp(d*x+c))))

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 80 vs. \(2 (27) = 54\).
time = 0.28, size = 80, normalized size = 2.96 \begin {gather*} -b {\left (\frac {\log \left (e^{\left (-d x - c\right )} + 1\right )}{d} - \frac {\log \left (e^{\left (-d x - c\right )} - 1\right )}{d} - \frac {2 \, e^{\left (-d x - c\right )}}{d {\left (e^{\left (-2 \, d x - 2 \, c\right )} + 1\right )}}\right )} + \frac {a \log \left (\tanh \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csch(d*x+c)*(a+b*sech(d*x+c)^2),x, algorithm="maxima")

[Out]

-b*(log(e^(-d*x - c) + 1)/d - log(e^(-d*x - c) - 1)/d - 2*e^(-d*x - c)/(d*(e^(-2*d*x - 2*c) + 1))) + a*log(tan
h(1/2*d*x + 1/2*c))/d

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 180 vs. \(2 (27) = 54\).
time = 0.36, size = 180, normalized size = 6.67 \begin {gather*} \frac {2 \, b \cosh \left (d x + c\right ) - {\left ({\left (a + b\right )} \cosh \left (d x + c\right )^{2} + 2 \, {\left (a + b\right )} \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + {\left (a + b\right )} \sinh \left (d x + c\right )^{2} + a + b\right )} \log \left (\cosh \left (d x + c\right ) + \sinh \left (d x + c\right ) + 1\right ) + {\left ({\left (a + b\right )} \cosh \left (d x + c\right )^{2} + 2 \, {\left (a + b\right )} \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + {\left (a + b\right )} \sinh \left (d x + c\right )^{2} + a + b\right )} \log \left (\cosh \left (d x + c\right ) + \sinh \left (d x + c\right ) - 1\right ) + 2 \, b \sinh \left (d x + c\right )}{d \cosh \left (d x + c\right )^{2} + 2 \, d \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + d \sinh \left (d x + c\right )^{2} + d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csch(d*x+c)*(a+b*sech(d*x+c)^2),x, algorithm="fricas")

[Out]

(2*b*cosh(d*x + c) - ((a + b)*cosh(d*x + c)^2 + 2*(a + b)*cosh(d*x + c)*sinh(d*x + c) + (a + b)*sinh(d*x + c)^
2 + a + b)*log(cosh(d*x + c) + sinh(d*x + c) + 1) + ((a + b)*cosh(d*x + c)^2 + 2*(a + b)*cosh(d*x + c)*sinh(d*
x + c) + (a + b)*sinh(d*x + c)^2 + a + b)*log(cosh(d*x + c) + sinh(d*x + c) - 1) + 2*b*sinh(d*x + c))/(d*cosh(
d*x + c)^2 + 2*d*cosh(d*x + c)*sinh(d*x + c) + d*sinh(d*x + c)^2 + d)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \operatorname {sech}^{2}{\left (c + d x \right )}\right ) \operatorname {csch}{\left (c + d x \right )}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csch(d*x+c)*(a+b*sech(d*x+c)**2),x)

[Out]

Integral((a + b*sech(c + d*x)**2)*csch(c + d*x), x)

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 72 vs. \(2 (27) = 54\).
time = 0.40, size = 72, normalized size = 2.67 \begin {gather*} -\frac {{\left (a + b\right )} \log \left (e^{\left (d x + c\right )} + e^{\left (-d x - c\right )} + 2\right ) - {\left (a + b\right )} \log \left (e^{\left (d x + c\right )} + e^{\left (-d x - c\right )} - 2\right ) - \frac {4 \, b}{e^{\left (d x + c\right )} + e^{\left (-d x - c\right )}}}{2 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csch(d*x+c)*(a+b*sech(d*x+c)^2),x, algorithm="giac")

[Out]

-1/2*((a + b)*log(e^(d*x + c) + e^(-d*x - c) + 2) - (a + b)*log(e^(d*x + c) + e^(-d*x - c) - 2) - 4*b/(e^(d*x
+ c) + e^(-d*x - c)))/d

________________________________________________________________________________________

Mupad [B]
time = 1.41, size = 79, normalized size = 2.93 \begin {gather*} \frac {b}{d\,\mathrm {cosh}\left (c+d\,x\right )}-\frac {2\,\mathrm {atan}\left (\frac {{\mathrm {e}}^{d\,x}\,{\mathrm {e}}^c\,\left (a\,\sqrt {-d^2}+b\,\sqrt {-d^2}\right )}{d\,\sqrt {a^2+2\,a\,b+b^2}}\right )\,\sqrt {a^2+2\,a\,b+b^2}}{\sqrt {-d^2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b/cosh(c + d*x)^2)/sinh(c + d*x),x)

[Out]

b/(d*cosh(c + d*x)) - (2*atan((exp(d*x)*exp(c)*(a*(-d^2)^(1/2) + b*(-d^2)^(1/2)))/(d*(2*a*b + a^2 + b^2)^(1/2)
))*(2*a*b + a^2 + b^2)^(1/2))/(-d^2)^(1/2)

________________________________________________________________________________________